import Vue from 'vue';

import VueRouter from 'vue-router';

Vue.use(VueRouter);

const router = new VueRouter({
  mode: 'history',
  base: '/',
  routes: [
    {
      name: 'home',
      path: '/',
      redirect: '/newtask',
      component: () => import('../page/home/Index'),
      children: [{
        name: 'newtask',
        path: '/newtask',
        component: () => import('../page/newtask/NewTask')
      },
      {
        name: 'going',
        path: '/going',
        component: () => import('../page/going/Going')
      },
      {
        name: 'price',
        path: '/price',
        component: () => import('../page/price/Index')
      }]
    },
    {
      name: 'join',
      path: '/join',
      component: () => import('../page/join/Join')
    },
    {
      name: 'joinus',
      path: '/joinus',
      component: () => import('../page/join/JoinUs')
    },
    {
      name: 'joinconfirm',
      path: '/joinconfirm',
      component: () => import('../page/join/JoinConfirm')
    },
    {
      name: 'feedback',
      path: '/feedback',
      component: () => import('../page/home/FeedBack')
    },
    {
      name: 'login',
      path: '/login',
      component: () => import('../page/login/Index')
    },
    {
      name: 'userprotocol',
      path: '/userprotocol',
      component: () => import('../page/login/UserProtocol')
    },
    {
      name: 'pricacypolicy',
      path: '/privacypolicy',
      component: () => import('../page/login/PrivacyPolicy')
    },
    {
      name: 'forgetpassword',
      path: '/forgetpassword',
      component: () => import('../page/login/ForgetPassword')
    },
    {
      name: 'setpassword',
      path: '/setpassword',
      component: () => import('../page/login/SetPassword')
    },
    {
      name: 'register',
      path: '/register',
      component: () => import('../page/login/Register')
    },
    {
      name: 'product',
      path: '/product',
      component: () => import('../page/product/Index')
    },
    {
      name: 'products',
      path: '/products',
      component: () => import('../page/product/Product')
    },
    {
      name: 'orders',
      path: '/orders',
      component: () => import('../page/orders/Orders')
    },
    {
      name: 'message',
      path: '/message',
      component: () => import('../page/personal/Message')
    },
    {
      name: 'setmessage',
      path: '/setmessage',
      component: () => import('../page/personal/SetMessage')
    },
    {
      name: 'setphone',
      path: '/setphone',
      component: () => import('../page/personal/SetPhone')
    },
    {
      name: 'setpaypassword',
      path: '/setpaypassword',
      component: () => import('../page/personal/SetPayPassWord')
    },
    {
      name: 'setconfirmpassword',
      path: '/setconfirmpassword',
      component: () => import('../page/personal/ConfirmPassWord')
    },
    {
      name: 'testphone',
      path: '/testphone',
      component: () => import('../page/personal/TestPhone')
    },
    {
      name: 'nickname',
      path: '/nickname',
      component: () => import('../page/personal/NickName')
    },
    {
      name: 'certification',
      path: '/certification',
      component: () => import('../page/personal/Certification')
    },
    {
      name: 'order',
      path: '/orders/:id',
      component: () => import('../page/orders/Order')
    },
    {
      name: 'address',
      path: '/address',
      component: () => import('../page/address/Address')
    },
    {
      name: 'aboutus',
      path: '/aboutus',
      component: () => import('../page/home/AboutUs')
    },
    {
      name: 'wallet',
      path: '/wallet',
      component: () => import('../page/wallet/Detail')
    },
    {
      name: 'bindbank',
      path: '/bindbank',
      component: () => import('../page/wallet/BindBank')
    },
    {
      name: 'detail',
      path: '/detail',
      component: () => import('../page/wallet/Detail')
    },
    {
      name: 'details',
      path: '/details',
      component: () => import('../page/wallet/Details')
    },
    {
      name: 'withdrawdeposit',
      path: '/withdrawdeposit',
      component: () => import('../page/wallet/WithdrawDeposit')
    },
    {
      name: 'cards',
      path: '/cards',
      component: () => import('../page/wallet/Cards')
    },
    {
      name: 'choosecard',
      path: '/choosecard',
      component: () => import('../page/wallet/ChooseCard')
    },
    {
      name: 'controlcards',
      path: '/controlcards/:from',
      component: () => import('../page/wallet/ControlCards')
    },
    {
      name: 'success',
      path: '/success',
      component: () => import('../page/wallet/Success')
    },
    {
      name: 'wastebill',
      path: '/wastebill',
      component: () => import('../page/wastebill/WasteBill')
    },
    {
      name: 'historyorder',
      path: '/historyorder',
      component: () => import('../page/historyorder/HistoryOrder')
    },
    {
      name: 'balanceofpayments',
      path: '/balanceofpayments',
      component: () => import('../page/wallet/BalanceOfPayments')
    },
    {
      name: 'recharge',
      path: '/recharge',
      component: () => import('../page/wallet/Recharge')
    },
    {
      name: 'rechargedetail',
      path: '/rechargedetail',
      component: () => import('../page/wallet/RechargeDetail')
    },
    {
      name: 'messagecenter',
      path: '/messagecenter',
      component: () => import('../page/personal/MessageCenter')
    },
    {
      name: 'editorder',
      path: '/editorder/:orderNo',
      component: () => import('../page/orders/EditOrder')
    },
    {
      name: 'orderdetail',
      path: '/orderdetail/:orderNo',
      component: () => import('../page/newtask/OrderDetail')
    },
    {
      name: 'detailrobbing',
      path: '/detailrobbing',
      component: () => import('../page/newtask/DetailsRobbing')
    },
    {
      name: 'gradencenter',
      path: '/gradencenter',
      component: () => import('../page/grade/gradencenter')
    },
    {
      name: 'experience',
      path: '/experience',
      component: () => import('../page/grade/experience')
    },
    {
      name: 'mygraden',
      path: '/mygraden',
      component: () => import('../page/grade/MyGraden')
    },
    {
      name: 'detailsrecoverypoints',
      path: '/detailsrecoverypoints',
      component: () => import('../page/historyorder/DetailsRecoveryPoints')
    },
    {
      name: 'study',
      path: '/study',
      component: () => import('../page/study/Study')
    },
    {
      name: 'simulation',
      path: '/simulation',
      component: () => import('../page/simulation/Simulation')
    },
    {
      name: 'simulationsuccess',
      path: '/simulationsuccess',
      component: () => import('../page/simulation/component/SimulationSuccess'),
    },
    {
      name: 'coursesuccess',
      path: '/coursesuccess',
      component: () => import('../page/simulation/CourseSuccess')
    }]
});

export default router;